package global
	
{
	public class GameState
	{
		public static var DEBUG_STATE:int = 0;
		public static var LOADER_POOL_MAX:int = 5;
		public static var REMOTE_LOAD_TIMEROUT:int = 10000;
		public static var SEAT_MAX:int = 4;//座位个数
		
		public static const GAME_WIDTH:int = 780;
		public static const GAME_HEIGHT:int = 550;
		public static const GAME_TABLE_HEIGHT:int = 430;
		
		public static var serverIp:String;
		public static var serverPort:int;
		
		public static var traceType:int;
		
		public static var version:String;
		
		public static var snsId:String = "";
		public static var snsKey:String = "";
		public static var sns:String = "";
		public static var time:String = "";
		
		public static var playerHomePage:String = "";//个人主页
		public static var playerId:int = -1;
		public static var playerCurrentSitId:int = -1;
		
		public static var isPlaySound:Boolean = true;
		public static var isEscape:String = "0";
		
		public static var resourceLink:String;
		
		public static const sitXYS:Array = [[180,8],[25,165],[180,312],[460,312],[615,165],[460,8]];
		public static const sitButXYS:Array = [[225,38],[75,190],[225,332],[505,332],[657,190],[505,38]];
		
		public static const sitCardXYS:Array = [[240,124],[180,182],[237,240],[470,240],[580,182],[467,124]];
		
		public static const sitBankerXYS:Array = [[208,124],[151,193],[207,269],[547,269],[601,193],[546,124]];
		public static const giveCardXYS:Array = [[180,83],[25,243],[180,385],[460,385],[615,243],[460,83]];
		
		public static var playerName:String = "";
		
		//是否托管
		public static var isAutoPlay:Boolean = false;
		//是否坐下
		public static var isSited:Boolean = false;
		//是否开始玩牌
		public static var isRoundStarted:Boolean = false;
		//大厅房间列表
		public static var hallRoomsListLink:String = "http://192.168.0.102/3&snsId=sss&key=sfs&sns=4";
		
		//是否已经加载上
		public static var isModulPlayerInfoLoaded:Boolean;
		
		//是否在游戏厅 
		public static var isInGameRoom:Boolean;
		//是否登陆
		public static var isLogin:Boolean;
		//是否显示vip
		public static var isShowVip:Boolean;
		public static var vipType:int;
		public static var vipTime:String;
		public static var gameRoomFee:int;
		
		public static var playerInfoXml:XML;
		
		public static var inviteLink:String;
		public static var shopLink:String;
		public static var tutorLink:String;
		
		public static var isRobot:String;
		public static var isRobotStart:Boolean = true;
		
		//是否快速游戏
		public static var isQuickGame:int = 0;
		
		public static function getTestSnSid():String
		{
			return Math.floor(100000 * Math.random()).toString();
		}
		
		public static function getServerLink():String
		{
			if (serverPort)
			{
				return "http://" + serverIp + ":" + serverPort + "/?sns=" + GameState.sns 
					+ "&snsId=" + GameState.snsId 
					+"&time=" + GameState.time
					+ "&action=";
			}
			return "http://" + serverIp + "/?sns=" + GameState.sns 
				+ "&snsId=" + GameState.snsId 
				+ "&time=" + GameState.time
				+ "&action=";
		}
		
		public static function getTutorLink():String
		{
			/*switch (GameState.sns)
			{
				case "1":
					return "http://apps.renren.com/openyou/intro.php";
					break;
				case "2":
					return "";
					break;
				case "3":
					return "http://apps.51.com/openyou/intro.php";
					break;
			}
			return "";*/
			return tutorLink;
		}
		
		public static function getShopLink():String
		{
			/*switch (GameState.sns)
			{
				case "1":
					return "http://apps.renren.com/openyou/pay.php";
					break;
				case "2":
					return "";
					break;
				case "3":
					return "http://apps.51.com/openyou/pay.php";
					break;
			}
			return "";*/
			return shopLink;
		}
		
		public static function getInviteLink():String
		{
			/*switch (GameState.sns)
			{
				case "1":
					return "http://apps.renren.com/request.do?app_id=49960&actiontext=%E6%88%90%E5%8A%9F%E9%82%80%E8%AF%B7%E4%B8%80%E4%B8%AA%E5%A5%BD%E5%8F%8B%EF%BC%8C%E6%82%A8%E5%B0%86%E8%8E%B7%E5%BE%971000%E9%87%91%E5%B8%81&mode=naf&action=http://apps.renren.com/openyou/";
					break;
				case "2":
					return "";
					break;
				case "3":
					return "http://apps.51.com/openyou/invite.php";
					break;
			}
			return "";*/
			return inviteLink;
		}
	}
}